<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>购物车</title>
		<link rel="stylesheet"href="../css/作业3.css"/>
		<script src="../js/作业3.js"type="text/javascript" ></script>
	</head>
	<body>
		<form action="#"method="get">
		<div><h1 align="center">真划算</h1></div>
		<table id="tablea" border="1" cellpadding="0" cellspacing="1" align="center">
			<thead align="center">
				<tr>
					<td>商品</td>
					<td>单价（元）</td>
					<td>颜色</td>
					<td>库存</td>
					<td>好评率</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody align="center">
				<tr>
					<td>罗技M185鼠标</td>
					<td>80</td>
					<td>黑色</td>
					<td>893</td>
					<td>98%</td>
					<td><input type="button"value="加入购物车" onclick="shopping(this)"/></td>
				</tr>
				<tr>
					<td>微软X470键盘</td>
					<td>150</td>
					<td>黑色</td>
					<td>9028</td>
					<td>96%</td>
					<td><input type="button"value="加入购物车" onclick="shopping(this)"/></td>
				</tr>
				<tr>
					<td>洛克iphone6手机壳</td>
					<td>60</td>
					<td>透明</td>
					<td>672</td>
					<td>99%</td>
					<td><input type="button"value="加入购物车" onclick="shopping(this)"/></td>
				</tr>
				<tr>
					<td>蓝牙耳机</td>
					<td>100</td>
					<td>蓝色</td>
					<td>8937</td>
					<td>95%</td>
					<td><input type="button"value="加入购物车" onclick="shopping(this)"/></td>
				</tr>
				<tr>
					<td>金士顿U盘</td>
					<td>70</td>
					<td>红色</td>
					<td>482</td>
					<td>100%</td>
					<td><input type="button"value="加入购物车" onclick="shopping(this)"/></td>
				</tr>
			</tbody>
		</table>
		<!-------------------购物车---------------------------------->
		<div><h1 align="center">购物车</h1></div>
		<table id="tableb" border="1" cellpadding="0"cellspacing="1" align="center">
			<thead align="center">
				<tr>
					<td>商品</td>
					<td>单价（元）</td>
					<td>数量</td>
					<td>金额（元）</td>
					<td>删除</td>
				</tr>
			</thead>
			<tbody id="tbodyb" align="center">
				
				
			</tbody>
			<tfoot>
				<tr>
					<td colspan="3" >总计</td>
					<td id="sumall"></td>
					<td></td>
				</tr>
			</tfoot>
		</table>
		</form>
	</body>
</html>

